extends ../layout
block content
  .pb-2.mt-2.mb-4.border-bottom
    h2
      i.fab.fa-paypal(style='color: #1B4A7D').fa-sm
      | PayPal API
  .btn-group.d-flex(role='group')
    a.btn.btn-primary(href='https://developer.paypal.com/docs/integration/direct/make-your-first-call/', target='_blank').w-100
      i.far.fa-check-square.fa-sm
      | Quickstart
    a.btn.btn-primary(href='https://developer.paypal.com/docs/api/', target='_blank').w-100
      i.fas.fa-code.fa-sm
      | API Reference
  h3 Sample Payment
  if result
    if canceled
      h3 Payment got canceled!
    if success
      h3 Payment got executed successfully!
    a(href='/api/paypal')
      button.btn.btn-primary New payment
  else
    div
      p Redirects to PayPal and allows authorizing the sample payment.
      a(href=approvalUrl)
        button.btn.btn-primary Authorize payment